﻿package plugin.social
{
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import manager.*;
    import plugin.social.consts.*;
    import plugin.social.game.*;
    import view.*;

    public class Social extends FlashUIBase
    {
        private var _ui:SocialGame;

        public function Social()
        {
            return;
        }// end function

        override protected function preLoaderInit() : void
        {
            super.preLoaderInit();
            appendLoader(Config.getUrl("assets/images/mornui/common.swf", ResourceType.NORMAL));
            appendLoader(Config.getUrl("assets/images/mornui/social.swf", ResourceType.NORMAL));
            return;
        }// end function

        override protected function initGUI() : void
        {
            this._ui = new SocialGame(this);
            mGUI = this._ui;
            return;
        }// end function

        override protected function openRefresh() : void
        {
            PluginManager.instance.sendToServer("social", CMDSocial.GET_SOCIALLIST, null);
            this._ui.initEvent();
            if (data)
            {
                this._ui.changeTitle(int(data));
            }
            return;
        }// end function

    }
}
